package guopai.android.outfieldcheck;


import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TabHost;
import android.widget.TextView;

public class CarCheckDetailActivity extends TabActivity {
	
	private TextView title;
	private Button left_btn;
	private Button right_btn;
	private Menu mMenu;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.car_check_detail);
		TabHost th = getTabHost();
		
		title = (TextView)findViewById(R.id.title_view);
		title.setText("车况明细");
		left_btn = (Button)findViewById(R.id.title_bt_left);
		right_btn = (Button)findViewById(R.id.title_bt_right);
		
        th.addTab(th.newTabSpec("tab1")
                .setIndicator("静态数据1")
                .setContent(R.id.view1));
        th.addTab(th.newTabSpec("tab2")
                .setIndicator("静态数据2")
                .setContent(R.id.view2));
        th.addTab(th.newTabSpec("tab3")
                .setIndicator("动态数据")
                .setContent(R.id.view3));
		
		left_btn.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View arg0) {
				// TODO Auto-generated method stub
				Intent it=new Intent(CarCheckDetailActivity.this,CarCheckOperationActivity.class);
				startActivity(it);
			}
			
		});
		
		
	}
	
    @Override
	public boolean onCreateOptionsMenu(Menu menu) {
        // Hold on to this
        mMenu = menu;
        
        // Inflate the currently selected menu XML resource.
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.menu1, menu);   
        return true;
    }


}
